﻿using System;
using System.Linq;

public partial class Controls_FrontEnd_advertisement : System.Web.UI.UserControl
{
    public string GetAdvert()
    {
        var list = new Business.Adv().Adv_GetByCondition(string.Empty);
        var html = "<p>" + Environment.NewLine;
        html = list.Aggregate(html, (current, adv) => current + ("<a title=\"" + adv.Name + "\" target=\"_blank\" href=\"" + adv.Link + "\">" + Environment.NewLine + "<img height=\"84\" border=\"0\" style=\"margin: 5px; vertical-align: middle;\" title=\"" + adv.Name + "\" alt=\"acd\" src=\"" + Business.Config.ApplicationUrl + "resources/images/upload/" + adv.Image + "\">" + Environment.NewLine + "</a>" + Environment.NewLine));
        html += "</p>" + Environment.NewLine;
        return html;
    }
}